<%= error_messages_for 'task' %>

<!--[form:assignment]-->

<table cellpadding=5 cellspacing= border=0 width=100%>
<tr>
<td><label for="task_client_id">Client</label><br/>
</td>
<td>
<% @clients = Client.find(:all, :order => "laat_name" )
@client_array = Array.new
for client in @clients
client_name =""
if client.status == 'P'
	client_name = client.first_name + " " + client.laat_name
else
	client_name = client.firm_name
end
@client_array.push([client_name, client.id])
end

@client_array.insert(0,['-SELECT-',nil]) %>
<%= select 'task', 'client_id', @client_array %>	
</td>
</tr>

<tr>
<td><label for="task_assignment_template_id">Assignment Master</label><br/>
</td>
<td>

<% @assignments = AssignmentTemplate.find(:all, :order => "name" ).map {|u| [u.name, u.id]}%>
<% @assignments.insert(0,['-SELECT-',nil]) %>
<%= select 'task', 'assignment_template_id', @assignments %>	
</td>
</tr>

<tr>
<td><label for="task_date_of_acceptance">Acceptance Date</label>
</td>
<td>
<%= date_select  'task', 'date_of_acceptance' %> 
</td>
</tr>

<tr>
<td><label for="task_target_date_of_completion">Target Completion Date</label>
</td>
<td>
<%= date_select  'task', 'target_date_of_completion' %>
</td>
</tr>

<tr>
<td><label for="task_employee_id">Assigned Staff</label><br/>
</td>
<td>
<% @employees = Employee.find(:all, :order => "name" ).map {|u| [u.name, u.id]}%>
<% @employees.insert(0,['-SELECT-',nil]) %>
<%= select 'task', 'employee_id', @employees %>	
</td>
</tr>
<tr>
<td><label for="task_status">	Status</label>
</td>
<td>
<%= select 'task', 'status', Task::STATUS  %>
</td>
</tr>

</table>


<!--[eoform:assignment]-->

